package star.cloud.asme.asmePerson.asmePersonInfo;

import com.baomidou.mybatisplus.core.metadata.IPage;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import star.cloud.asme.base.dto.Result;
import star.cloud.asme.base.mybatis.IBaseController;

import java.util.List;

@RestController
@RequestMapping("/asmePerson/asmePersonInfo")
@RequiredArgsConstructor
public class AsmePersonInfoController implements IBaseController<AsmePersonInfo> {

    private final AsmePersonInfoService asmePersonInfoService;

    @Override
    public Result<AsmePersonInfo> getOneByCondition(String columnName, Object columnValue) {
        return asmePersonInfoService.getOneByCondition(columnName, columnValue);
    }

    @Override
    public Result<List<AsmePersonInfo>> getListByCondition(String columnName, Object columnValue) {
        return asmePersonInfoService.getListByCondition(columnName, columnValue);
    }

    @Override
    public Result<List<AsmePersonInfo>> getListByConditions(AsmePersonInfo conditions) {
        return asmePersonInfoService.getListByConditions(conditions);
    }

    @Override
    public Result<IPage<AsmePersonInfo>> getListByConditionsWithPage(AsmePersonInfo conditions) {
        return asmePersonInfoService.getListByConditionsWithPage(conditions);
    }

    @Override
    public Result<AsmePersonInfo> insertOne(AsmePersonInfo entity) {
        return asmePersonInfoService.insertOne(entity);
    }

    @Override
    public Result<AsmePersonInfo> updateOne(AsmePersonInfo entity) {
        return asmePersonInfoService.updateOne(entity);
    }
}
